package com.dgshanger.sanhxiaofeisc.mvp.contract;

import com.dgshanger.sanhxiaofeisc.entity.PayResultEntity;
import com.dgshanger.sanhxiaofeisc.entity.VipDetailEntity;
import com.xx.baseuilibrary.mvp.lcec.BaseMvpLcecView;
import com.xx.baseutilslibrary.network.rx.RxHttpObserver;

/**
 * VipCardContract
 * 沉迷学习不能自拔
 * Describe：
 * Created by 雷小星🍀 on 2018/5/2 11:49.
 */

public interface VipCardContract {

    interface Model {
        /**
         * 加载VIP详情
         */
        void loadVipDetail(String vip_id, RxHttpObserver<VipDetailEntity> httpObserver);

        /**
         * 会员卡购买
         */
        void vipBuy(String vip_id, String buy_qty, String buy_type, String user_pay_pwd, RxHttpObserver<PayResultEntity> httpObserver);

        /**
         * 获取微信支付类字符串
         *
         * @param wxContentBean 接口返回微信支付类
         */
        String getPayReqString(PayResultEntity.WxContentBean wxContentBean);

        void getBuyAgreement(RxHttpObserver<String> httpObserver);
    }

    interface View extends BaseMvpLcecView<VipDetailEntity> {
        /**
         * 获取VipID
         */
        String getVipId();

        /**
         * 获取会员卡购买数量
         *
         * @return 购买数量
         */
        String getVipCount();

        /**
         * 是否同意
         *
         * @return
         */
        boolean isAgreed();

        /**
         * 隐藏支付弹窗
         */
        void dismissPayDialog();

        void startAliPay(String info);

        void startWeChatPay(String info);

        void showPayDialog();

        void onGetBuyAgreement(String data);
    }

    interface Presenter {
        /**
         * 加载VIP详情
         */
        void loadVipDetail();

        /**
         * 会员购买
         */
        void vipBuy(String payType, String... payPassword);

        void checkPayPassword();

        void getBuyAgreement();
    }
}
